import request from '@/utils/request'

// 查询电话记录列表
export function listResourceRecord(query) {
  return request({
    url: '/api2/resourceRecord/list',
    method: 'get',
    params: query
  })
}

// 查询电话记录详细
export function getResourceRecord(id) {
  return request({
    url: '/api2/resourceRecord/' + id,
    method: 'get'
  })
}

// 新增电话记录
export function addResourceRecord(data) {
  return request({
    url: '/api2/resourceRecord',
    method: 'post',
    data: data
  })
}

// 修改电话记录
export function updateResourceRecord(data) {
  return request({
    url: '/api2/resourceRecord',
    method: 'put',
    data: data
  })
}

// 删除电话记录
export function delResourceRecord(id) {
  return request({
    url: '/api2/resourceRecord/' + id,
    method: 'delete'
  })
}
// 删除指定类型的资源记录  1-图片 2-音频
export function cleanOperResourceRecord(type) {
  return request({
    url: '/api2/resourceRecord/cleanOperResourceRecord/' + type,
    method: 'delete'
  })
}
